package io.coderyeah.ymcc.feign.client;

import io.coderyeah.ymcc.feign.fallback.CourseClientFallback;
import io.coderyeah.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "service-course", fallbackFactory = CourseClientFallback.class)
public interface CourseServiceClient {

    @GetMapping("/course/courseState/{id}")
    JSONResult getCourseStateById(@PathVariable("id") Long id);

    @GetMapping("/course/info/{ids}")
    JSONResult getCourseInfo(@PathVariable("ids") List<Long> ids);
}
